package com.jtjrenren.android.taxi.passenger.manger.pay.weixin;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.jtjrenren.android.taxi.passenger.utils.ModuleUtils;
import com.jtjrenren.android.taxi.passenger.R;
import com.tencent.mm.sdk.openapi.IWXAPI;
import com.tencent.mm.sdk.openapi.WXAPIFactory;

public class AppRegister extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        final IWXAPI api = WXAPIFactory.createWXAPI(context, null);

        // 将该app注册到微信
        api.registerApp(ModuleUtils.getStrFromResource(R.string.wx_app_id));
    }
}
